﻿@model MMITWeb.Areas.Teller.Models.WithdrawViewModel
@using MMITDomain.Entities

@{
    ViewBag.Title = "Transactions: Withdraw";
}
      <div class="top-bar"> <a href="#" class="button">Teller </a>
        <h1>Transactions:</h1>
        <div class="breadcrumbs"><a href="#">Transactions</a> / @Html.ActionLink("Withdraw","Withdraw")</div>
      </div>
      <br />
      <div class="select-bar">
      @using (Html.BeginForm())
      {
        @Html.ValidationSummary(false)

        @Html.TextBoxFor(m => m.Token)

        <input type="submit" value="Search" class="t-button t-button-icontext" 
        style="border: none; height: 32px; cursor: pointer;"/>

      }
      </div>
      @{
    
          Transaction p = (Transaction)ViewData["transaction"];
    if (p != null)
    {         
            using (Html.BeginForm("PayCustomer","Transactions"))
            {    
                <div class="table"> <img src="~/Content/Teller/img/bg-th-left.gif" width="8" height="7" alt="" class="left" /> <img src="~/Content/Teller/img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
                <table class="listing form" cellpadding="0" cellspacing="0">
                  <tr>
                    <th class="full" colspan="2">Sender Information</th>
                  </tr>
                  <tr>
                    <td class="first" width="172"><strong>@Html.Label("First Name: ") </strong></td>
                    <td class="last">@p.Sender.Customer.Firstname</td>
                  </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Middle Name: ")</strong></td>
                    <td class="last">@p.Sender.Customer.Middlename</td>
                  </tr>
                  <tr>
                    <td class="first"><strong>@Html.Label("Last Name: ")</strong></td>
                    <td class="last">@p.Sender.Customer.Lastname</td>
                  </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Mobile: ")</strong></td>
                    <td class="last">@p.Sender.Customer.Mobile</td>
                  </tr>
                  <tr><th class="full" colspan="2">Recipient Information</th></tr>
                            <tr>
                    <td class="first" width="172"><strong>@Html.Label("First Name: ") </strong></td>
                    <td class="last">@p.Recipient.Customer.Firstname</td>
                  </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Middle Name: ")</strong></td>
                    <td class="last">@p.Recipient.Customer.Middlename</td>
                  </tr>
                  <tr>
                    <td class="first"><strong>@Html.Label("Last Name: ")</strong></td>
                    <td class="last">@p.Recipient.Customer.Lastname</td>
                  </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Mobile: ")</strong></td>
                    <td class="last">@p.Recipient.Customer.Mobile</td>
                  </tr>
                            <tr class="bg">
                    <td class="first"><strong>@Html.Label("Identification Number: ")</strong></td>
                    <td class="last">@p.Recipient.Customer.IdentificationNumber</td>
                  </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Identification Type: ")</strong></td>
                    <td class="last">@p.Recipient.Customer.IdentificationType.Name</td>
                  </tr>
                    <tr><th class="full" colspan="2">TRANSACTION INFORMATION</th></tr>
           
                   <tr class="bg">
                    <td class="first"><strong>@Html.Label("Transaction Code: ")</strong></td>
                    <td class="last">@p.TransactionCode</td>
                  </tr>

                    <tr class="bg">
                    <td class="first"><strong>@Html.Label("Transaction Type: ")</strong></td>
                    <td class="last">@p.TransactionType.Name</td>
                  </tr>
         
                    <tr class="bg">
                    <td class="first"><strong>@Html.Label("Amount: ")</strong></td>
                    <td class="last">@p.Amount.ToString()</td>
                  </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Transaction Date: ")</strong></td>
                    <td class="last">@p.TimeInitiated.ToString()</td>
                    </tr>
                  <tr class="bg">
                    <td class="first"><strong>@Html.Label("Transaction Status: ")</strong></td>
                    <td class="last">@p.coreStatus</td>
                  </tr>
                </table>

                            @Html.Hidden("TransactionId",p.Id)
                            <p><input type="submit" value="Pay Customer" class="t-button t-button-icontext" 
                                style="border: none; height: 32px; cursor: pointer;"/>
                                </p> 
              </div>                                            
            }
      }
      else
      {
            <text>No Records Found </text>  
      }

    }





